﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using S.Archives.Read.Api.Application.Command;
using S.Archives.Read.Api.Application.CommandHandlers;

namespace S.Archives.Read.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class WanderController : ControllerBase
    {
        private IMediator mediator;
        public WanderController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 获取流转信息
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        /// 
        [HttpPost("GetWander")]
        public async Task<IActionResult> GetWander(GetWanderCommand t)
        {
            var result = await mediator.Send(t);
            return Ok(result);
        }
    }
}
